Crate lyon_path [] [src]

Lyon path

A simple path data structure implementing the traits provided in the builder and iterator modules.

Examples

use lyon_path::default::Path;
use lyon_path::math::{point};
use lyon_path::builder::*;

// Create a builder object to build the path.
let mut builder = Path::builder();

// Build a simple path.
let mut builder = Path::builder();
builder.move_to(point(0.0, 0.0));
builder.line_to(point(1.0, 2.0));
builder.line_to(point(2.0, 0.0));
builder.line_to(point(1.0, 1.0));
builder.close();

// Generate the actual path object.
let path = builder.build();

for event in &path {
    println!("{:?}", event);
}

Re-exports

pub extern crate lyon_geom as geom;

Modules

builder

Lyon path builder

default
iterator

Lyon path iterators

math

Basic types that are used everywhere. Most other lyon crates reexport them.

walk

Path walking

Structs

ArcFlags

Flag parameters for arcs as described by the SVG specification.

PathState

Represents the current state of a path while it is being built.

Enums

FlattenedEvent
PathEvent
QuadraticEvent
Segment
SvgEvent